# 基础镜像
FROM python:3.6-alpine

# Docker镜像开发者说明
MAINTAINER Python:3.6-alpine Docker Image mail:"enovo458@126.com" author:"drophair"

# alpine环境换源
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories && \
    echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
RUN apk add --no-cache ca-certificates && \
    apk add --no-cache curl bash tree tzdata && \
    apk add --no-cache wget axel && \
    apk add --no-cache build-base && \
    cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    axel https://ghproxy.com/raw.githubusercontent.com/pypa/get-pip/main/public/get-pip.py && \
    python3 get-pip.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
    /usr/local/bin/python3 -m pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && \
    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
    pip install setuptools && \
    pip install wheel

RUN echo "当前pip软件源为："$(pip config list)
RUN apk del tree

# 结束 Docker 镜像编译
RUN echo "完成Docker镜像编译"
